import request from "@/utils/request";

export function getNumberRules(paramters) {
  return request({
    url: "api/v1/number-rules/documents",
    method: "get",
    params: paramters,
    basicDataServer: true,
  });
}

export function getNumberRule(id) {
  return request({
    url: "api/v1/number-rules/documents/"+id,
    method: "get",
    basicDataServer: true,
  });
}

export function addNumberRule(data) {
  return request({
    url: "api/v1/number-rules/documents",
    method: "post",
    data: data,
    basicDataServer: true,
  });
}

export function updateNumberRule(data) {
  return request({
    url: "api/v1/number-rules/documents",
    method: "put",
    data: data,
    basicDataServer: true,
  });
}

export function deleteNumberRule(id) {
  return request({
    url: "api/v1/number-rules/documents/" + id,
    method: "delete",
    basicDataServer: true,
  });
}
